#ParallelPlatform Project - A web platform to distribute and share knowledge
#Copyright (C) 2011  Daniel Guerrero Martinez & Sergio Rodriguez Lumley
#
#This program is free software: you can redistribute it and/or modify
#it under the terms of the GNU General Public License as published by
#the Free Software Foundation, either version 3 of the License, or
#(at your option) any later version.
#
#This program is distributed in the hope that it will be useful,
#but WITHOUT ANY WARRANTY; without even the implied warranty of
#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#GNU General Public License for more details.
#
#You should have received a copy of the GNU General Public License
#along with this program. If not, see <http://www.gnu.org/licenses/>.
from django.conf.urls.defaults import *
from django.views.generic.simple import direct_to_template
from settings import MEDIA_ROOT
from AlohaLink import get_tree

# Uncomment the next two lines to enable the admin:
from django.contrib import admin
admin.autodiscover()

#from django.contrib.auth.views import login, logout

urlpatterns = patterns('',
    (r'^admin/', include(admin.site.urls)),
    (r'^media/(?P<path>.*)$', 'django.views.static.serve',{ 'document_root':MEDIA_ROOT }),
    (r'^alohaSettings/$', direct_to_template, { 'template' : 'alohaSettings.js', 'extra_context' : {'tree': get_tree} }),
    (r'^resources/', include('ParallelPlatform.resources.urls')),
    (r'^i18n/', include('django.conf.urls.i18n')),
    (r'^accounts/', include('ParallelPlatform.userManager.urls')),
    (r'^', include('ParallelPlatform.wiki.urls')),

)
